<?php

namespace app\admin\controller;

use easyadmin\app\libs\Menu;
use easyadmin\app\libs\MenuItem;
use easyadmin\controller\Admin as easyAdmin;

class Admin extends easyAdmin
{


    protected $siteName = '招财猫';

    /**
     * 设置系统导航
     * @return Menu
     */
    public function configMenu(): Menu
    {
        return Menu::getInstance()->setItems([

            MenuItem::addItem('首页', 'index/index', ['icon' => 'layui-icon layui-icon-home']),
            MenuItem::addItem('公告管理', 'notice/lists', ['icon' => 'layui-icon layui-icon-notice']),
            MenuItem::addItem('新闻管理', 'news/lists', ['icon' => 'layui-icon layui-icon-chat']),
            MenuItem::addItem('任务管理', 'task/lists', ['icon' => 'layui-icon layui-icon-snowflake']),
            MenuItem::addItem('用户管理', 'user/lists', ['icon' => 'layui-icon layui-icon-user']),
            MenuItem::addItem('平台账户', 'javascript:', ['icon' => 'layui-icon layui-icon-cellphone-fine'])
                ->setChildren([
                    MenuItem::addItem('银行账户', 'bankReceivable/lists'),
                    MenuItem::addItem('支付宝账户', 'alipayReceivable/lists'),
                    MenuItem::addItem('微信账户', 'wechatPayReceivable/lists'),
                ]),
            MenuItem::addItem(' 用户详情', 'javascript:', ['icon' => 'layui-icon layui-icon-form'])->setChildren([
                MenuItem::addItem('用户账户','account/lists')
            ]),
            MenuItem::addItem('审核管理', 'javascript:', ['icon' => 'layui-icon layui-icon-date'])
                ->setChildren([
                    MenuItem::addItem('用户充值审核', 'reviewUserRecharge/lists', ['icon' => 'layui-icon layui-icon-center']),
                    MenuItem::addItem('用户任务审核', 'reviewUserTask/lists', ['icon' => 'layui-icon layui-icon-center']),
                    MenuItem::addItem('用户提现审核', 'reviewUserCost/lists', ['icon' => 'layui-icon layui-icon-center']),
                ]),
            MenuItem::addItem('系统', 'javascript:')->setChildren([
                MenuItem::addItem('管理员', 'manage/lists'),
            ]),

        ]);


    }

    public function getLoginUserId() {
        return \easyadmin\app\libs\User::getInstance()->getUserId();
    }

}
